package com.chalk.service;


import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.chalk.exception.ColumnNotEmptyException;
import com.chalk.model.Picture;

import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author glq
 * @since 2020-12-19
 */

public interface PictureService extends IService<Picture> {

    /**
     * 新增
     */
    public int addPicture(Picture entity);


    /**
     * 获取轮播图分页
     *
     * @param map
     * @return
     */
    public Page<Picture> getPictureForPage(Map<String, Object> map) throws ColumnNotEmptyException;

    /**
     * 新增轮播图
     * @param picture
     * @return
     */
    public Boolean savePicture(Picture picture);

    /**
     * 修改轮播图
     * @param picture
     * @return
     */
    public Boolean updatePicture(Picture picture);

    /**
     *  删除轮播图
     * @param pictureId
     * @return
     */
    public  Boolean deletePicture(Integer pictureId);

}
